<html>
<head><meta charset="utf-8"><title>broken intra-doc link issue · rustdoc · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/index.html">rustdoc</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/broken.20intra-doc.20link.20issue.html">broken intra-doc link issue</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="230070450"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/broken%20intra-doc%20link%20issue/near/230070450" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/broken.20intra-doc.20link.20issue.html#230070450">(Mar 12 2021 at 17:47)</a>:</h4>
<p>I was wondering if someone could help with a broken intra-doc link issue.  It is breaking CI on a few projects (like Cargo), and was introduced in yesterday's nightly.</p>
<p>The issue is that the link to <code>as_mut_ptr</code> in <a href="https://doc.rust-lang.org/nightly/std/io/struct.IoSlice.html#method.as_ptr">this section</a> is broken.  It is a page-relative link to <code>#method.as_mut_ptr</code>.</p>
<p>What is strange is that when the std docs are built via <code>./x.py test</code>, the link is correct (it is <code>../../std/primitive.slice.html#method.as_mut_ptr</code>).  So the linkchecker on rust's CI is passing.  However, the docs as created for distribution are broken.</p>



<a name="230074907"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/broken%20intra-doc%20link%20issue/near/230074907" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/broken.20intra-doc.20link.20issue.html#230074907">(Mar 12 2021 at 18:18)</a>:</h4>
<p>It is hard to tell if it is <a href="https://github.com/rust-lang/rust/issues/82641">#82641</a> or <a href="https://github.com/rust-lang/rust/issues/82960">#82960</a>.  I suspect it is <a href="https://github.com/rust-lang/rust/issues/82641">#82641</a>, but it is hard to tell what that PR is doing (there isn't a description, and the link to zulip doesn't really explain anything to me).</p>



<a name="230084480"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/broken%20intra-doc%20link%20issue/near/230084480" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/broken.20intra-doc.20link.20issue.html#230084480">(Mar 12 2021 at 19:29)</a>:</h4>
<p>Oh, I think this might be due to <a href="https://github.com/rust-lang/rust/issues/82950">#82950</a>, nevermind.   The linkcheck scripts use latest master against most recent nightly, and the two are out of sync today. It should resolve tomorrow.</p>



<a name="230091364"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/broken%20intra-doc%20link%20issue/near/230091364" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/broken.20intra-doc.20link.20issue.html#230091364">(Mar 12 2021 at 20:20)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/issues/82641">#82641</a> doesn't have anything to do with the generated /std/ docs, it only affects nightly-rustc.</p>



<a name="230091609"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/broken%20intra-doc%20link%20issue/near/230091609" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/broken.20intra-doc.20link.20issue.html#230091609">(Mar 12 2021 at 20:22)</a>:</h4>
<p><span class="user-mention silent" data-user-id="120518">Eric Huss</span> <a href="#narrow/stream/266220-rustdoc/topic/broken.20intra-doc.20link.20issue/near/230084480">said</a>:</p>
<blockquote>
<p>Oh, I think this might be due to <a href="https://github.com/rust-lang/rust/issues/82950">#82950</a>, nevermind.   The linkcheck scripts use latest master against most recent nightly, and the two are out of sync today. It should resolve tomorrow.</p>
</blockquote>
<p>I'm not sure what you mean by this. <a href="https://doc.rust-lang.org/beta/std/io/struct.IoSlice.html#method.as_ptr">https://doc.rust-lang.org/beta/std/io/struct.IoSlice.html#method.as_ptr</a> is also broken, as is stable. Could you post the CI error you're seeing?</p>



<a name="230093247"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/broken%20intra-doc%20link%20issue/near/230093247" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/broken.20intra-doc.20link.20issue.html#230093247">(Mar 12 2021 at 20:32)</a>:</h4>
<p>but yes, I would expect this to be 82950 if anything</p>



<a name="230095221"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/broken%20intra-doc%20link%20issue/near/230095221" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/broken.20intra-doc.20link.20issue.html#230095221">(Mar 12 2021 at 20:48)</a>:</h4>
<p>The error looks like <a href="https://github.com/rust-lang/cargo/runs/2096613537">this</a>.</p>
<p>All external books use the <a href="https://github.com/rust-lang/rust/blob/master/src/tools/linkchecker/linkcheck.sh"><code>linkcheck.sh</code></a> script to validate links in their own CI in the same way as <code>rust-lang/rust</code> does.  One limitation is that it fetches the latest copy of <code>linkchecker/main.rs</code>, but runs against the latest nightly docs.  When exceptions are removed from the linkchecker, there's a &lt;24 hour window where CI might fail since the two are slightly out of sync.  Once the next nightly is published, everything should be ok.</p>
<p>This is the first time I've seen this in the past couple of years, so I'm not too concerned about it.  I was just confused as to what was happening, and had forgotten this possibility.</p>



<a name="230095367"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/broken%20intra-doc%20link%20issue/near/230095367" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/broken.20intra-doc.20link.20issue.html#230095367">(Mar 12 2021 at 20:50)</a>:</h4>
<p>oh I see, cargo is using the linkcheck binary itself</p>



<a name="230095389"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/broken%20intra-doc%20link%20issue/near/230095389" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/broken.20intra-doc.20link.20issue.html#230095389">(Mar 12 2021 at 20:50)</a>:</h4>
<p>Hopefully we get to a point where all exceptions can be removed. <span aria-label="smile" class="emoji emoji-1f642" role="img" title="smile">:smile:</span></p>



<a name="230095420"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/broken%20intra-doc%20link%20issue/near/230095420" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/broken.20intra-doc.20link.20issue.html#230095420">(Mar 12 2021 at 20:50)</a>:</h4>
<p>that would need core/alloc/std to be merged I think</p>



<a name="230095442"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/broken%20intra-doc%20link%20issue/near/230095442" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/broken.20intra-doc.20link.20issue.html#230095442">(Mar 12 2021 at 20:50)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/blob/b3e19a221e63dcffdef87e12eadf1f36a8b90295/src/tools/linkchecker/main.rs#L36">https://github.com/rust-lang/rust/blob/b3e19a221e63dcffdef87e12eadf1f36a8b90295/src/tools/linkchecker/main.rs#L36</a></p>



<a name="230095451"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/broken%20intra-doc%20link%20issue/near/230095451" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/broken.20intra-doc.20link.20issue.html#230095451">(Mar 12 2021 at 20:50)</a>:</h4>
<p>hm, yea, that might take a while <span aria-label="grinning" class="emoji emoji-1f600" role="img" title="grinning">:grinning:</span></p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>